Log In  
[back to top]

[ :: Read More :: ]

I noticed that split() splits the table at the first character if you use a separator of more than two characters.
Is it a bug or a specification that split() cannot be used with separators of more than two characters?

foreach(split('123456','45'),print)
--123
--56 (Expect only :6)

Thank you.


If there is no limit to the number of characters in the separator, string replacement can be implemented in a compact way. (as in replace_short())

function replace_short(s,f,r)
  return join(split(s,f),r or '')
end

-- join() is custom function

function replace(s,f,r)
 local a=''
 while #s>0 do
  local t=sub(s,1,#f)
  a=a..(t~=f and sub(s,1,1) or r or '')
  s=sub(s,t==f and 1+#f or 2)
 end
 return a
end

P#107090 2022-02-17 13:37 ( Edited 2023-06-15 13:36)

[ :: Read More :: ]

Cart #knutil-12 | 2023-08-13 | Code ▽ | Embed ▽ | No License
12

Feature Overview

"KNUTIL" is a library for PICO-8 that contains functions that are frequently used in the games I have created.
I've kept the functions that I eventually needed in my production.

In this cart, I show you how the scene functions work with animations.
Z key: Execute the order command.
Up/Down: Select the order command.

SCENE MANAGER controls and replaces the order in which functions are called with a small number of tokens by using consecutive string instructions.
The generated SCENE can register a global function as an ORDER.
One of the registered ORDERS is retrieved by SCENE and the process is repeated for the specified length.
When the processing is finished, it repeats the processing of the next ORDER.
This is expected to facilitate the planning of the performance.

Using SCENE

Create a SCENE ( MKSCENES )

SCENES = MKSCENES( { 'UPD', 'DRW', 'KEY' } )

SCENES: Contains the generated SCENEs.

Enter an ORDER into a SCENE ( SCMD )

SCMD([[
    [SCENE NAME] [COMMAND] [FUNCTION NAME] [DURATION FRAME]
    [SCENE NAME] [COMMAND] [FUNCTION NAME] [DURATION FRAME]
...
]])
  • [SCENE NAME] : Specify the name generated by MKSCENES.
  • [COMMAND] : Specify the following ORDER COMMANDS.
  • [FUNCTION NAME] : Specify the name of the global function.
  • [DURATION FRAME]: Specifies the number of frames to be sustained; if set to 0, it will not automatically terminate.

Only "tab characters" are supported for indentation in command descriptions.

ORDER COMMANDS

ST (SET): Delete all stacked ORDERS in SCENE and set new ORDERS.

SCMD[[
UPD ST MANAGE 0
]]

Clean the SCENE "UPD" and add a "FUNCTION MANAGE".

PS (PUSH): Add an ORDER to the SCENE

SCMD[[
KEY PS KEYCHECK 0
]]

Add the SCENE "KEY" with "FUNCTION KEYCHECK" at the top.

US (UNSHIFT): interrupt ORDER at the beginning of a SCENE.

SCMD[[
DRW US DRAWRECT 200
DRW US NIL 100
DRW US DRAWCIRC 200
]]

Scene "DRW" is executed in the ORDER of DRAWCIRC, NIL, DRAWRECT.

RM (REMOVE): remove one ORDER.

SCMD[[
DRW RM
]]

Removes the first ORDER of the SCENE "DRW".

SCMD[[
DRW RM DRAWRECT
]]

Deletes the DRAWRECT ORDER of SCENE "DRW", starting from the top.

CL (CLEAR): Remove all stacked ORDERS from the SCENE.

SCMD[[
KEY CL
]]

Deletes all the ORDERS registered in the SCENE "KEY".

FI (FIND): Search and retrieve ORDERS from a SCENE.

RES = SCMD[[
DRW FI DRAWRECT
]]

In this case, the return value RES is a table, and the ORDER "DRAWRECT" is in the first element.

Create a function for ORDERS.

FUNCTION KEYCHECK( ORDER )
    PRINT('PROCESSIONG ORDER')
END

Run each SCENE.

## In the _UPDATE() and _DRAW() functions
FOREACH(SCENES,TRANSITION)

ORDER function

FUNCTION [FUNCTION NAME] ()
    CLS()
    IF _FST THEN
        STOP"IT'S FIRST!"
    END
    IF _LST THEN
        STOP"IT'S LAST!"
    END
    PRINT('COUNT: '.._CNT..'/'.._DUR)
END

Properties of ORDER

The following parameters can be referenced as global variables.

_FST / _LST

_FST : at first execution
_LST : at the last execution.

CNT / _DUR

_CNT : Execution count of the currently running ORDER.
_DUR : Count of expected end of the currently running ORDER.

_PRM

It contains the value specified in the second argument of SCMD.

_RATE

Used to specify the end from the start, e.g. in coordinates.

_RATE('[start] [end]', duration, count )

The default values for duration and count are the ones specified in SCMD.

Force ORDER termination.

Do RETURN 1
or
do _RM = 1.

Functions other than scenes

SET 1: Basic Library

★ Libraries for frequent use and quick implementation

AMID: Expand the arguments to positive and negative and do mid().

Cart #knutil_amid-1 | 2023-08-09 | Code ▽ | Embed ▽ | No License
2

BPACK: Pack the value of the bit specification with bit width.

Cart #knutil_bpack-0 | 2022-12-01 | Code ▽ | Embed ▽ | No License

BUNPACK: Slice the value with bit width.

Cart #knutil_bunpack-2 | 2022-11-30 | Code ▽ | Embed ▽ | No License
1

CAT: Concatenate tables. Indexes are added last and identical keys are overwritten.

Cart #concat___table-0 | 2022-03-11 | Code ▽ | Embed ▽ | No License
1

COMB: Combines two tables to create a hash table.

Cart #combine_table-0 | 2022-03-15 | Code ▽ | Embed ▽ | No License
1

ECPALT: Set transparency from palette table.

Cart #knutil_ecpalt-0 | 2023-08-07 | Code ▽ | Embed ▽ | No License

HTD: Split a continuous string of hexadecimal numbers into a table.

Cart #knutil_htd-0 | 2023-08-08 | Code ▽ | Embed ▽ | No License

HTBL: Converting a string to a table(Multidimensional Array / Hash Table / Jagged Arrays)

Cart #stringhashtable-5 | 2023-05-31 | Code ▽ | Embed ▽ | No License
1

INRNG: Tests that the specified value is within a range.

Cart #knutil_inrng-2 | 2022-06-30 | Code ▽ | Embed ▽ | No License
1

JOIN: Joins strings with a delimiter.

Cart #knutil_join-1 | 2022-09-10 | Code ▽ | Embed ▽ | No License
2

MKPAL: create a color swap table for use in PAL().

Cart #knutil_mkpal-0 | 2023-08-07 | Code ▽ | Embed ▽ | No License

MSPLIT: Multi-layer split.

Cart #knutil_msplit-1 | 2023-05-22 | Code ▽ | Embed ▽ | No License
2

OPRINT: Print with outline.

Cart #knutil_oprint-3 | 2023-07-02 | Code ▽ | Embed ▽ | No License
4

RCEACH: Iterate from rectangle values.

Cart #rceach-0 | 2022-03-30 | Code ▽ | Embed ▽ | No License
1

REPLACE: Perform string substitutions.

Cart #knutil_replace-1 | 2023-07-27 | Code ▽ | Embed ▽ | No License
6

TBFILL: Creates a table filled with the specified values.

Cart #knutil_tbfill-0 | 2022-09-12 | Code ▽ | Embed ▽ | No License
1

TMAP: More compact operable foreach iterator.

Cart #tablemap-1 | 2023-05-28 | Code ▽ | Embed ▽ | No License
1

TOHEX: Digit-aligned hexadecimal conversion (not including 0x).

Cart #knutil_tohex-1 | 2023-05-20 | Code ▽ | Embed ▽ | No License
2

TTABLE: If the argument is a table, the table is returned.

Cart #knutil_ttable-2 | 2023-07-28 | Code ▽ | Embed ▽ | No License
1

SET 2: Libraries to create objects

★ Rectangles that incorporate judgment and drawing, scenes that manage screen and operation transitions

EXRECT: Creates a rectangle object with extended functionality.

Cart #knutil_exrect-0 | 2023-04-24 | Code ▽ | Embed ▽ | No License
1

MKSCENES: This post! Manage screen and operation switching.

Cart #knutil-12 | 2023-08-13 | Code ▽ | Embed ▽ | No License
12

SET 3: Debugging Library

★ Real-time or stop and inspect at any timing

DBG: Displays any timing debugging value.

Cart #knutil_dbg-1 | 2023-08-10 | Code ▽ | Embed ▽ | No License
1

DMP: Dumps information about a variable.

Cart #vdmplua-4 | 2023-06-10 | Code ▽ | Embed ▽ | No License
3

++ REMOVED ++


TOC: flr(divide) can be substituted for \.
ECMKPAL: The format was changed and integrated in MKPAL.
OUTLINE: Renamed to OPRINT, will be reflected in v0.14 knutil.
SPLIT: Renamed to MSPLIT, will be reflected in v0.14 knutil.
TTOH: Sum the numbers in argument 1 by shifting bits to argument 2. This function has been re-specified to BPACK.
HTOT: Divide an integer value into 8 bits and make it into a table. This function has been re-specified to BUNPACK.
SLICE: Cuts out the table at the specified index. the function was removed because there is a {unpack()} with a similar function.
BMCH: Compares two values to judge that they both have a bit in common. "Bitwise operators" make it less significant.

TONORM: Normalize argument values to the correct type(boolian, nil, number).

UPDATE HISTORY


v0.14.0

  • amid:change the order of arguments.
  • ecpalt:be sure to perform initialization of the transparency settings.
  • htbl:token cost cut, note second return value.
  • htd:change from tmap to foreach.
  • dbg:support for nil
  • dmp:added _update_buttons().
  • mkpal:arguments before and after the change. support for multiple palette sets.
  • msplit:wrapper for split() is eliminated and renamed.
  • oprint:inherit outline() and rename function.
  • replace:support for multiple replacements.
  • tmap:support for false replacements.
  • ttable:use count() to determine.
  • scene:
    • cmdscenes:changed to scmd. for a while cmdscenes will remain for compatibility.
    • sh:delete order shift as it is not used.
    • order:
    • swap 𝘦𝘯𝘷[] and order parameters to support references from global variables
    • change parameter name(_rate _cnt _rm _fst _lst _nm _dur _prm)
  • changed diagram staging; no intervening shift processing.
  • parallel added to diagram production.
  • correction of library documentation.

  • [deleted]:
    • toc
    • tonorm
    • ecmkpal

v0.13.1

  • corrected commented out vdmp to dmp.

v0.13

  • scene:
    • cmdscenes:supports indentation description by tabs.

v0.12

  • library help added to pause menu.
  • bmch: unlisted.
  • exrect: fix variable and function names.
  • scene:
    • rate: adjustment of decimal point overflow countermeasures.
    • cmdscenes: continuous call handling.
    • added functions for iterators.
  • dbg: simplification by join.
  • replace: support for multiple replacements.

v0.11

  • htd: fixed table values to local variables
  • bpack: specification change from ttoh()
  • bunpack: specification change from htot()
  • slice: the function was removed because there is a {unpack()} with a similar function.

v0.10

  • split: supports multi-dimensional arrays
  • cmdscenes: fixed for split update
  • sceneorder: update for use of tuples
  • dmp: apply p8scii font color

v0.9

  • tbfill: changed to specify indexes at the beginning and end of tables, support for variable length arguments.
  • tohex: fixed for update of tbfill()

v0.8

  • join: use of tuples
  • tbfill: defaults to 1 or specifies the start of the table
  • tohex: support for updating join()

v0.7

  • sceneorder:"rate" func countermeasures against overflow of digits
  • code update saved token:
    • htbl: 7 tokens
    • tonorm: 9 tokens

v0.6

  • simplified handling of scene orders
  • rceach: name change from ecxy()
  • inrng: using tupple twice
  • exrect.con: name change from exrect.cont()
  • exrect.hov: name change from exrect.hover()
  • scenes: order.rate is calculated enough value in the last count
  • cmdscenes: change name from scenesbat

v0.5
Mainly due to sub()'s CPU cost countermeasure.

  • replace: fix usage of sub()
  • htd: Convert from split()
  • htbl: Run newlines without replace()
  • scene: Save cost with split()&comb() at initialization
  • dbg: Change to display values without dbg() argument
  • example: Add htbl() example use

Please do not use this library and its code for the purpose of promoting vaccines.

P#59538 2021-03-03 12:49 ( Edited 2023-08-13 16:22)

[ :: Read More :: ]

Hello, everyone.

A few days ago, a game I created called KONSAIRI was released on Steam!
http://store.steampowered.com/app/1448220/

There are still very few examples of PICO-8 games on the Steam platform as PICO-8 games.

I think that's because, as content, PICO8 titles are seen as lacking when compared to other game engines and those created in a free development environment with no restrictions.

But I challenge you to dream of being in the same store as a masterpiece game, despite its limitations.

I also wish to see more interest in PICO-8 in my part of Japan.

[0x0]

P#83569 2020-11-01 14:36

[ :: Read More :: ]

Hello.

Suggestion.
I would like the exported file to include the current config.txt (global_config.txt) as local_config.txt in the exported file.

This will allow us to play from the creator's ideal config in another user's environment.

"global_config.txt" refers to the config.txt that I've been using.
If both global_config.txt and local_config.txt exist, local_config.txt is assumed to take precedence.

Sequence of events


I recently released the PICO-8 app in executable format.
However, the user's environment that downloaded it had different operations and a lower frame rate for inactive windows.
The released manual had to be rewritten and the creator was unable to provide the ideal play environment.

A question thread containing this
https://www.lexaloffle.com/bbs/?tid=39940

P#83100 2020-10-19 03:47

[ :: Read More :: ]

Is there a recommended coding method that would eliminate the drop frames that occur when the pico8 window is turned to the back?
Or is there a memory address I can set?

I want to keep the number of times to execute _update60() and draw() the same, even at 30fps.

P#83056 2020-10-18 03:05

[ :: Read More :: ]

Has anyone played it?

https://bitchunk.itch.io/konsairi

P#82463 2020-09-30 12:29

[ :: Read More :: ]

Before I knew it, I had made a lot of them...

P#82254 2020-09-25 08:54 ( Edited 2022-04-04 15:55)

[ :: Read More :: ]

I'm developing KONSAIRI, a game I've been working on for a while now that I'm finalizing and checking throughout the game.

As I mentioned before, the goal of the game is to move back and forth between 16 different areas to reach the final destination.

However, it seemed to feel like the same old thing before you even reach halfway through the game.

That's why i added Dungeon mode, which changes the look and feel of the adventure dramatically.

Not only do you take damage when you touch an enemy, but there are hidden passages and hints scattered throughout the game that will help you get to the true ending.

When you stand in front of an enemy, you will see a timing gauge.
It's not for attacking, but for getting through to the enemy's rear.
A well-timed "step move" will allow you to move forward with no damage.
If time passes, you will be damaged.
If you move away from the spot, you can avoid the danger.

You can bring in items, throw them and use skills.
You can open doors, read hints, light up and explore, and more...!

KONSAIRI TRIAL version

https://bitchunk.itch.io/konsairi

P#81477 2020-09-03 16:01 ( Edited 2020-09-03 16:06)

[ :: Read More :: ]

I think being able to scroll horizontally with "Shift + mouse wheel" would make it easier to check for longer lines.

I can also use line breaks to keep up appearances, but I don't want to add too many characters.

P#80878 2020-08-17 13:30 ( Edited 2023-03-26 13:54)

[ :: Read More :: ]

Current Development

I'm building a relationship between NPCs and area map connections.
These are mainly for the latter 8 areas.
(The "keys" that NPCs have might be easier to understand.)

This game has a combined total of 16 areas.
There are also useful items that will help you move through such a large world.
These items can be found at the end of the first half of the game.

Then, the image below shows the map of the first half of the game.

Reduced map for 8 areas

Most of the maps are over 128*128 cell size.
The aspect ratio varies from area to area and the structure is challenging to explore.
Once you get your "KUWAI", use it! You can look around the entire area.

Actual map display

An animated tile is provided in each area.
These tiles bring about the effect of the wind.
You can use "PERSNIP" to change the wind (flow).

Awaking bells

The status limit is relaxed when you earn a BELL.
When you earn bells, the status limit is relaxed.
Bells can be earned by eating with NPCs when your friendship is somewhat higher.

The higher your status, the less items you'll have to wear out or take time to move around.

The color of the BELL is the color of the POT

Acquiring a bell of the same color (material) will have no effect.
You may be able to get bells of a different color from a different NPC.
The color of the pot and the color of the bell are the same; check it when you help the NPC.

Updated KONSAIRI trial version!

The performance of the action part has been improved!
Download a playable file here.
https://bitchunk.itch.io/konsairi

Have fun in a small and wide world! ;)

P#80624 2020-08-13 02:27 ( Edited 2020-08-13 09:48)

[ :: Read More :: ]

Does the random value generation by srand() always produce the same pattern output as long as the same seed value is input?

Does the output pattern change due to a change in the environment?
For example, the upgrades, the amount of code, the timing of the exports, the machine or OS you're running...

So far I haven't been able to verify much and I haven't encountered the fact that the output results have changed, but I am concerned.

Thanks for your help.

P#79667 2020-07-20 12:55 ( Edited 2020-07-20 12:56)

[ :: Read More :: ]

I'm working on a big project for PICO8.

Around the end of 2018, I learned about the scalability of multi-carting and continued to research and create it to this day.

We were able to give each of the four carts a role, rather than just being a data bank .

Cart 1: Title/Ending/3D dungeon scene
Cart 2: Platformer Scene
Cart 3: Cooking Scene
Cart 4: World Map Scene/Important Item Riddle Solving Operation

Because of these many factors, an hour or more of play is a must.
Data saves are automatic.
(Position when resume, growth and LIFE, possessions, time, status of NPCs helped, farmland, important items, veggies, history of veggies removed, history of enemies removed, and other things for cart-to-cart interaction).

Most of the game system is complete. I'm currently assembling the map for the later areas.

If anyone is planning an original, reasonably large game, PICO8 will be used as a prototype. It looks like they will progress the production and do the actual product in another game engine. I've seen some of those opinions. (Not my project.)

So sometimes what I do seems like a waste of time or laziness in choosing a development environment.
I don't see a lot of things planned in PICO8 from start to finish. It's not much.
Is it because of the scarcity that I am still developing? I don't think that's the only reason.

I'm not great at asking questions and such. Still, I've been able to implement a lot of features in the game because people before me have been posting and discussing their work repeatedly. Thanks for leaving the information, very grateful to you.

(I think the English translation is unnatural because it is a long sentence.)

KONSAIRI trial

P#78871 2020-07-04 07:18 ( Edited 2020-09-27 13:43)

[ :: Read More :: ]

Cart #pelogen-6 | 2021-05-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
26

A new version has been released!

PELOGEN2

What the tool can do

  • 3D modeling in 15x15x15 size.
  • Save and load into a sprite sheet.
  • Export the loading code from the sprite sheet.
  • Export the drawing code of the 3D model.

Control are followings(WIP)
Reference

Examples of actual use

KONSAIRI

Export Star Model(Sample)

updated (v0.2.3)

  • Added: Display of the next surface to be generated.
  • Added: Blinking of the face to be drawn by the selected vertex.
  • Added: Blinking of the cursor and vertex pointer.
  • Adjusted: Shader filter switching.
  • Adjusted: Shader palette.
  • Adjusted: Rendering of trifill.
  • Deleted: 4 grid lines on each axis.

Old ver

v0.2.2

updated (v0.2.2)

Cart #pelogen-4 | 2020-05-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
26

  • Added: Rotate vertices position with 90 degree angle(x/y/z + MouseDouble-L)
  • Added: Swap two vertices position before the selected vertex(Shift-S)
  • Added: Display mode switchable to "Face / Line / point"(Tab)
  • Added: Switchable Shading palette(MouseDouble-M)
  • Fixed: Improvement Flat shading, Culling
  • Changed: minimum position changed "-7" from -8(model size is 15x15x15)
  • Changed: View Rotation is not infinity.
  • Changed: Light source display method
  • Changed: Trifill() source code from p01

v0.2.1


Cart #pelogen-2 | 2020-04-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
26

updated (v0.2.1)

  • fixed: Object was not displayed in PLAY mode
  • fixed: Select of vertex was over the number of indexes(there was occurring error)
  • "p01_triangle_163" source code by
    @p01

    v0.2.0


    Cart #pelogen-1 | 2020-04-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    26

    updated (v0.2.0)

    • Added: bottom plate
    • Added: Jumps the "Edit pointer" to the Vertex on the Mouse pointer(Mouse-L)
    • Enabled: Z sort
    • fixed: Weird rotation of space + Mouse-R

    v0.1.0


    Cart #pelogen-0 | 2020-04-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    26


    P#74562 2020-04-08 13:33 ( Edited 2024-03-25 06:27)

    [ :: Read More :: ]

    I am working on a small 3D modeling tool separate from the main game project.

    The created 3D model is written to a sprite, and it is ready to be read.
    However, operations and views are very confusing.

    No such tool exists on the PICO-8 platform. (Or not seen)
    I guess it's probably because there's an alternative and it's easier to produce.

    Would you like to take advantage of this tool, even if it is paid?

    P#74479 2020-04-05 02:01 ( Edited 2020-04-05 03:27)

    [ :: Read More :: ]

    Cart #sfxtelm-1 | 2019-12-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    9

    PICO-8 Telmin!

    CONTROLLS

    • mouse button: PLAY SFX
    • Z / X : Change waveform(0~7) and custom instruments(8~15)
    • mouse wheel : Change SFX Duration

    old version


    Cart #sfxtelm-0 | 2019-12-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    9

    CONTROLLS

    • mouse button: PLAY SFX
    • LEFT/RIGHT : Change waveform(0~7) and custom instruments(8~15)

    P#71497 2019-12-29 16:07 ( Edited 2019-12-30 08:23)

    [ :: Read More :: ]

    Cart #stringhashtable-5 | 2023-05-31 | Code ▽ | Embed ▽ | No License
    1

    Feature Overview

    This is a script that parses String data and converts it into a hash table. (Not compatible with JSON)

    • A single string can initialize many values.
    • Returns at least an empty table.
    • Elements can be added space-separated. (the space character cannot be used as a value.)
    • {} specifies a table.
    • key=val; key{val} specifies the key and value of the table.
    • Newline codes are ignored.
    • Bool values, Nil, and Hexadecimal strings are automatically normalized.
    • The first level can be initialized with global values by using cat() in _env. CAT(_env,HTBL[[VALUES]]) --init with 5tokens
    • Double quotation marks are not used (they tend to be fewer characters than JSON).
    • Not compatible with JSON.
    • HTBL() uses 150 Token.

    "k{v1 v2 ...}" is table. serve just Immediately before hashkey.
    "k=v;" is key and value.
    See code in cart for examples of format usage.

    The parser normalizes individual values using TONORM() in the following order of precedence.

    • Number(hexadecimal)
    • String
    • Bool
    • Nil

    may want to Use DMP() if check the converted table.

    This function is included in the KNUTIL library.

    UPDATE history


    v0.4

    • Cut token costs (-12 tokens)
    • Tonorm() is now built-in.
    • The second return value of the final result is now nil.(be careful when doing add())
    • Document inserted.

    v0.3

    • code update saved token:
      • htbl 7 tokens
      • tonorm 9 tokens

    v0.2

    • run newlines without replace()

    v0.1 (2020 08 26)

    • Miniaturization of the cord.
    • No replace "\n" in the recursive process.

    old ver


    Cart #stringhashtable-3 | 2022-07-30 | Code ▽ | Embed ▽ | No License
    1

    P#71300 2019-12-22 06:44 ( Edited 2023-10-23 23:14)

    [ :: Read More :: ]

    Cart #piduzohazo-0 | 2019-04-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    4


    Happy Update PICO-8!

    U or D: Change line length
    L or R: Change line width

    X : Sub line
    Z : Add line
    X + Z : Reset the center sprite

    P#63532 2019-04-15 14:37

    [ :: Read More :: ]

    Cart #salahachider-3 | 2022-09-28 | Code ▽ | Embed ▽ | No License
    7


    The STG like "LIFE FORCE".
    Japanese title is "沙羅曼蛇".

    I refferred to Family computer ver.

    Main game is WIP.

    • ver 0.04:
      • Adjusted for PICO-8 0.2.5.
      • Title rendering no longer causes a processing drop.
      • Two fighters now appear.
      • Self-destruct.
    • ver 0.03: Stabilize sfx.(using music())
    • ver 0.02: Can shot the bullet. Power up, The players remaining number UI.
    • ver 0.01: Release.
    P#61434 2019-02-01 15:17 ( Edited 2022-09-28 16:01)

    [ :: Read More :: ]

    Cart #vdmplua-4 | 2023-06-10 | Code ▽ | Embed ▽ | No License
    3

    Feature Overview

    • DMP() prints values, table internals.
    • Stop the routine.
    • Clear Screen.
    • Display the contents of the specified table.
    • The order in which the associative array table is displayed is undefined.
    • Use the left, right, up, and down keys to scroll the screen and check the contents.
    • This function consumes 168 Tokens.
    local t={
     1
    ,str="string"
    ,obj={"o","b","j","e","c","t"}
    ,{{{}}}
    ,{nil,true,false,function()end}
    }
    dmp(t)

    Symbol summary

    #  Number
    $  String
    %  Boolean
    *  Function(output only the "[Function]")
    !  nil(table pairs() skips nil, so it is not shown.)
    {} Table

    This function is included in the KNUTIL library.

    release note


    v0.5

    • add _update_buttons() (enable btnp in goto loop in _update thread)

    v0.4

    • scrollable output.
    • exit with pause key.
    • additional colors for each type.
    • support for table display with 0 elements.
    • returns the result as a string.
    • simplified line feed concatenation.

    v0.3

    • fixed comment

    v0.2

    • name change: [ vdmp->dmp ]
    • remove value for print position.
    • add the type identifier
      before the table key.

    v0.1

    • first release(vdmp)

    P#60679 2019-01-08 14:10 ( Edited 2023-06-10 07:37)

    [ :: Read More :: ]

    Cart #fillpatdraw_02-7 | 2020-07-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    2

    FillPatDraw FullColor version

    This cart is tool that export code for drawing with FILLP() and RECTFILL().
    The Exported data can draw that using without Sprite sheet.

    You can also apply a check mask to an image by changing the value of _filppmask to a non-zero value.

    Rectfill pattern animation

    FILLP DRAW (2color version)

    Controls

    Sprite sheet view

    • Mouse Left Drag and Click
      1 Select the rectangle to be the source of the delimited block.
      2 Select the length of block from start to end.
      3 Click Export Button for Confirm and Enter the export (p8l)file name.
      In some cases there is a waiting time of 30 seconds or more.
    • Right Click
      Prev select mode.

    • Tab key
      Open the Menu Window.

    Menu

    • PLAY Button
      Start Pattern Draw Preview

    • SAVE Button
      SAVE PNG file and Attach Cart data

    • LOAD Button
      LOAD PNG file and Attach Cart data

    • CLEAR!! Button
      CLEAR Sprite sheet(not Attach Cart data)

    Pattern Draw Preview

    • Space key
      Stop and Start the Animation.
    • Left Click
      Step to Next BlockID.
    • Right Click
      Prev to Back BlockID.
    • Tab key
      Return The Menu Window.

    How to use the exported code


    Paste the code from the p8l file written by this tool into your code.

    To execute it add the following code.

    fillpat.draw(BlockID,x,y)
    • BlockID : Number in Selected Sprite sheet view mode.(start 1)
    • x,y : draw position.
    • Return value: If ID not found then TRUE else FALSE.

    How to add data

    That can add to the export data in the following way.

    fillpat={d=[[
    datablock1
    (add datablock2)
    (add datablock3)
    ]]

    Draw Sequence

    UPDATE

    • rev5: Improved drawing performance(25% faster). Reducing the tokens used. Abolition of autoload. Empty writing is suspended. Enabled the paste command on file name input.
    • rev4: Can specify the drawing position by 1px instead of 4px.(Using camera())
      Can superimpose masks while drawing.
      Supports export of multiple png files.
    • rev3: Tuning Encode and Draw performance.
    • rev2: Remove debug code
    • rev1: Fixed can't return on Tabkey
    P#60621 2019-01-06 15:29 ( Edited 2020-07-21 14:38)

    View Older Posts